
package com.xiaoma.myaudience.biz.util;

import com.xiaoma.myaudience.util.PrefHelper;

import android.content.Context;

/**
 * 本类处理SharePreference相关.
 * 
 * @author wjying
 */
public final class VideoPrefHelper extends PrefHelper {
    public final static String PREF_KEY_SHARE_ACCOUNT = "share_account";
    public static final String PREF_KEY_NETWORK_NOTIFY = "network_notify";
    public static final String PREF_KEY_SUBSCRIBE_SYNC = "subscribe_sync";
    public static final String PREF_KEY_PLAY_RECORD_SYNC = "play_record_sync";
    public static final String PREF_KEY_PLAY_RECORD_SYNC_INTERVAL = "play_record_sync_interval";
    
    public static boolean isNetworkNotify(Context context) {
        return getBoolean(context, PREF_KEY_NETWORK_NOTIFY, true);
    }
    
    public static boolean isSubscribeSync(Context context) {
        return getBoolean(context, PREF_KEY_SUBSCRIBE_SYNC, true);
    }

    public static boolean isPlayRecordSync(Context context) {
        return getBoolean(context, PREF_KEY_PLAY_RECORD_SYNC, true);
    }

    public static int getPlayRecordSyncInterval(Context context) {
        return Integer.valueOf(getString(context, PREF_KEY_PLAY_RECORD_SYNC_INTERVAL, "15"));
    }
}
